Skip to content

Deepen the engine’s legal actions and refusals - #56

Merged
JacobStephens2 merged 2 commits into
masterfrom
issue-55
Nov 29, 2026
Merged

JacobStephens2 merged 2 commits into
masterfrom
issue-55

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

Ordered engine candidates → reducer checks → legal actions
                                          ├→ floor refusals   (Snapshot)
                                          └→ lesson refusals  (Snapshot)

Single-card candidates carry the hand slot and card type that floor guidance uses. A Recovery can cover a standing Call after a Move. Once the Call is covered, the remaining Recovery shows the Stumble refusal.

Evidence

Execution evidence

  • The seed 9 check-count probe failed on master with up to 3 checks for an opening pair and 2 for a lesson buy. It passed on this branch with 1 check per shared candidate.
  • ./node_modules/.bin/vitest run packages/engine/tests/refusals.test.ts -t 'publishes floor guidance for a card added'
    Before the review fix — 1 failed with Error: Missing content for mov_999.
    After the review fix — 1 passed | 14 skipped.
  • The ordered legalActions, floorRefusals, and lessonRefusals matched master at dc93688 across 6,146 role Snapshots from 96 seeded games. The comparison covered both roles, content with and without Calls, each phase, both terminal states, all three lesson sources, and 775 no-op undo submissions.
  • npm test passed 404 tests, including the reducer properties, Snapshot refusals and visibility, client turn intent, and the existing golden replays. npm run lint and npm run typecheck passed. ENGINE_VERSION is 6.

Test seams

  • snapshotFor and applyAction for Recovery cover and Stumble guidance.
  • snapshotFor with a schema-valid addition to the bundled card catalog for the Spec regression.
  • legalActions and snapshotFor for the one-off master comparison.

Merge Danger

Door — Two-way. The reducer and resume envelope keep their existing contracts.

Blast radius — Engine.

Unaddressed findings

Standards

None. The single-card association now lives on its candidate.

Spec

None. The floor projection classifies cards from the supplied catalog, and the reproduced error has a regression test.

Security

None. The shared candidate inventory derives only from the viewer's own hand, the public market and supply, and published move history; the reducer stays the authority through applyAction. A seeded-game check found no partner hand or draw card named in legalActions, floorRefusals, or lessonRefusals, and every advertised action carried the viewer's role and applied cleanly, at both 828b885 and merge base dc93688.

Review coverage

Both reviewers read all five changed files. Unread changed files and generated-output exclusions are empty.

Closes #55

Built with codex codex-cli 0.172.0 · gpt-6.2-sol · xhigh

Security review outcome

No unaddressed introduced findings.

@JacobStephens2
JacobStephens2 merged commit 8a21266 into master Nov 29, 2026
6 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-55 branch November 29, 2026 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deepen the engine’s legal actions and refusals module

1 participant